home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 42
/
Amiga Format AFCD42 (Issue 126, Aug 1999).iso
/
-websites-
/
wirenet
/
arexx
/
logstfax.lha
/
LogSTFax.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1998-09-15
|
2KB
|
52 lines
/*
$VER: LogSTFaxCalls.rexx 1.0 (14.9.98)
by Neil Bothwick
This logs all incoming calls to STFax, including
CallerID information where available
*/
/* Change this to the name of your logfile */
logfile = 'Logs:STFaxCalls.log'
options results
port = address()
address command
if getclip('STFaxRingTime') = '' then call setclip('STFaxRingTime',0)
if time(s) - getclip('STFaxRingTime') > 5 then call setclip('STFaxRingCount',0)
call setclip('STFaxRingCount',getclip('STFaxRingCount') + 1)
call setclip('STFaxRingTime',time(s))
select
/* open GUI on first ring and optionally send commands to other programs */
when getclip('STFaxRingCount') = 1 then do
address(port)
'SHOW'
address command
/* Add any commands you would like executed when the phone rings*/
/* These are the ones I use to shut off all music programs */
/*
if show('P','YACDP') = 1 then address 'YACDP' 'STOP'
if show('P','ACDPLAY') = 1 then address 'ACDPLAY' 'STOP'
'Tools:Sound/tinymidiplay'
'breakname MPEGA'
'breakname PreludeAMP'
'breakname AmigaAMP'
*/
end
/* Wait for second ring for Caller ID information to become available */
when getclip('STFaxRingCount') = 2 then do
address(port)
'GETCALLERID'
CallerNo = result
'GETCALLERNAME' CallerNo
CallerName = result
address command
'echo >>"'logfile'"' left(date('W'),3) date('N')',' time() left(CallerNo,20) CallerName
end
otherwise nop
end
exit